package com.shop2cn.iapi.promotion.testcase;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

import org.json.JSONObject;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.promotion.parameter.GetPromotionPolicyByIdReq;
import com.shop2cn.iapi.promotion.parameter.GetPromotionPolicyByIdResp;
import com.shop2cn.iapi.promotion.serivce.GetPromotionByIdCall;
import com.shop2cn.iapi.promotion.serivce.PromotionInfoVerify;
import com.shop2cn.iapi.sellerpromotion.parameter.CreatePromotionBean;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.Shop2cnSellerPromotionCallService;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.TestDataManager;
import com.ymttest.utils.YMTDateUtil;
import com.ymttest.utils.compare.AssertHelper;
/**
*根据促销ID、买手ID查询促销详情
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_GetPromotionById{
	private static GetPromotionPolicyByIdReq getpromotionbyidBean;
	private static GetPromotionByIdCall getpromotionbyidCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("根据促销ID、买手ID查询促销详情");
	}

	@Before
	public void caseUp() {
		getpromotionbyidBean=new GetPromotionPolicyByIdReq();
		getpromotionbyidCall=new GetPromotionByIdCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getpromotionbyidCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_001() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("¥", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P3.class})
	@TestCase
	public void Tc_GetPromotionById_002() {
		Logger.start(true,"根据促销ID、买手ID查询促销详情-id空");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
//			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			Logger.verifyEquals(null, promotionPolicy.getPromotionPolicyDto(), "验证返回PromotionPolicyDto");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P3.class})
	@TestCase
	public void Tc_GetPromotionById_003() {
		Logger.start(true,"根据促销ID、买手ID查询促销详情-id不存在");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(999999);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			Logger.verifyEquals(null, promotionPolicy.getPromotionPolicyDto(), "验证返回PromotionPolicyDto");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P3.class})
	@TestCase
	public void Tc_GetPromotionById_004() {
		Logger.start(true,"根据促销ID、买手ID查询促销详情-seller不传");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
//			getpromotionbyidBean.setSellerId(sellerid);
			
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			Logger.verifyEquals(null, promotionPolicy.getPromotionPolicyDto(), "验证返回PromotionPolicyDto");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P3.class})
	@TestCase
	public void Tc_GetPromotionById_005() {
		Logger.start(true,"根据促销ID、买手ID查询促销详情-seller不正确");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			
			getpromotionbyidBean.setSellerId(33344);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			Logger.verifyEquals(null, promotionPolicy.getPromotionPolicyDto(), "验证返回PromotionPolicyDto");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_GetPromotionById_006() {
		Logger.start(true,"根据促销ID、买手ID查询促销详情-活动已取消");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			Shop2cnSellerPromotionCallService.EndAllEnablePromotion(sellerid);
			
			getpromotionbyidBean.setSellerId(sellerid);

			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			Logger.verifyEquals(null, promotionPolicy.getPromotionPolicyDto(), "验证返回PromotionPolicyDto");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_GetPromotionById_007() {
		Logger.start(true,"根据促销ID、买手ID查询促销详情-活动未开始");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setBegin(YMTDateUtil.getBeforeOrNextDay(1,"yyyy-MM-dd HH:mm:ss"));
			createpromotionBean.setEnd(YMTDateUtil.getBeforeOrNextDay(2,"yyyy-MM-dd HH:mm:ss"));
			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);

			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();
			Logger.verifyEquals(null, promotionPolicy.getPromotionPolicyDto(), "验证返回PromotionPolicyDto");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_GetPromotionById_009() {
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品：带指定商品");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_010() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-外币欧元");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("FRA");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("EUR");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("€", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_011() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-外币日元");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("JPN");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("JPY");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("日元", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_012() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-外币美元");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("USA");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("USD");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("$", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_013() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-外币英镑");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("GBR");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("GBP");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("£", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_014() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-港币");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("HKG");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("HKD");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("HK$", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_GetPromotionById_015() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-澳元");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("AUS");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("AUD");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("A$", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_016() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-加拿大元");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("CAN");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("CAD");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("$", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_GetPromotionById_017() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-韩元");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("KOR");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("KRW");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("₩", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_GetPromotionById_018() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-瑞士");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("CHE");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("CHF");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("₣", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_GetPromotionById_019() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-显示商品-新西兰");
		try {
			Integer sellerid = GodmchManageCallService.CreateCountrySellerMch("NZL");
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			createpromotionBean.setCurrency("NZD");
//			createpromotionBean.setProductIdList(Arrays.asList(pid));
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("NZ$", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetPromotionById_020() {
		//区别009
		Logger.start(true,"根据促销ID、买手ID查询促销详情-新增banner url、背景颜色、标题颜色 20200810");
		try {
			Integer sellerid = GodmchManageCallService.CreateSellerMch();
			String pid =TestDataManager.getRandomUUID().toString();
			CreatePromotionBean createpromotionBean = Shop2cnSellerPromotionCallService.initCreatePromotionBean(sellerid, 4);
			//新增 20200810
		   	createpromotionBean.setBannerUrl("落地页banner_"+TestDataManager.getRandomIntNum(5));
			createpromotionBean.setBgColor("背景颜色_"+TestDataManager.getRandomIntNum(5));
			createpromotionBean.setTitleColor("标题颜色_"+TestDataManager.getRandomIntNum(5));
			
			Integer promotionId = Shop2cnSellerPromotionCallService.CreatepromotionCall(createpromotionBean);
			Thread.sleep(1000);
			
			getpromotionbyidBean.setSellerId(sellerid);
			getpromotionbyidBean.setPromotionId(promotionId);
			getpromotionbyidBean.setShowProduct(true);
			
			getpromotionbyidCall.setData(getpromotionbyidBean);
			getpromotionbyidCall.callService();	
			
			Logger.verifyEquals("200", getpromotionbyidCall.getCode(), "验证返回Code");
			GetPromotionPolicyByIdResp promotionPolicy = getpromotionbyidCall.getData();

			PromotionInfoVerify promotionInfoVerify = new PromotionInfoVerify();
			promotionInfoVerify.verifyPromotionPolicyInDB(promotionPolicy.getPromotionPolicyDto());
			Logger.verifyEquals("¥", promotionPolicy.getPromotionPolicyDto().getCurrencySymbol(), "验证币种符号");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}